package com.flushbonading.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.flushbonading.mapper.ProjectScheduleMapper;
import com.flushbonading.pojo.ProjectSchedule;
import com.flushbonading.pojo.dto.ScheduleDTO;
import com.flushbonading.service.IProjectScheduleService;
import com.flushbonading.service.IProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zyx 2134208960@qq.com
 * @date 2021/5/12 9:50
 * @since 1.0.0
 */
@Service
public class ProjectScheduleImpl extends ServiceImpl<ProjectScheduleMapper, ProjectSchedule> implements IProjectScheduleService {

    @Autowired
    private ProjectScheduleMapper projectScheduleMapper;
    @Override
    public int insertSchedule(ScheduleDTO scheduleDTO) {
        return projectScheduleMapper.insertSchedule(scheduleDTO);
    }

    @Override
    public List<ScheduleDTO> getAllSchedule(int project_id) {
        return projectScheduleMapper.getAllSchedule(project_id);
    }

    @Override
    public List<ScheduleDTO> getAllScheduleByStudentNumber(String student_number) {
        return projectScheduleMapper.getAllScheduleByStudentNumber(student_number);
    }

    @Override
    public int deleteASchedule(ScheduleDTO scheduleDTO) {
        return projectScheduleMapper.deleteASchedule(scheduleDTO);
    }
}
